-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add multiplatform BLE stack for ISO/IEC 18013-5:2021 proximity. #814
Conversation
identity-android/src/main/java/com/android/identity/android/mdoc/transport/L2CAPServer.kt
Show resolved
Hide resolved
6988867
to
91b9c7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass...several suggestions that may need to be applied to all similar files. Or feel free to push back on any of them. I'll make another pass once you've had a chance to review these comments.
identity-android/src/main/java/com/android/identity/android/mdoc/transport/L2CAPClient.kt
Outdated
Show resolved
Hide resolved
...ty-doctypes/src/commonMain/kotlin/com/android/identity/documenttype/knowntypes/SampleData.kt
Outdated
Show resolved
Hide resolved
...ty-doctypes/src/commonMain/kotlin/com/android/identity/documenttype/knowntypes/SampleData.kt
Show resolved
Hide resolved
...-mdoc/src/androidMain/kotlin/com/android/identity/mdoc/transport/BleCentralManagerAndroid.kt
Outdated
Show resolved
Hide resolved
...-mdoc/src/androidMain/kotlin/com/android/identity/mdoc/transport/BleCentralManagerAndroid.kt
Show resolved
Hide resolved
...-mdoc/src/androidMain/kotlin/com/android/identity/mdoc/transport/BleCentralManagerAndroid.kt
Show resolved
Hide resolved
...c/src/commonMain/kotlin/com/android/identity/mdoc/transport/BleTransportCentralMdocReader.kt
Outdated
Show resolved
Hide resolved
...mdoc/src/commonMain/kotlin/com/android/identity/mdoc/transport/BleTransportPeripheralMdoc.kt
Outdated
Show resolved
Hide resolved
identity-mdoc/src/iosMain/kotlin/com/android/identity/mdoc/transport/BleCentralManagerIos.kt
Outdated
Show resolved
Hide resolved
...mdoc/src/commonMain/kotlin/com/android/identity/mdoc/transport/BleTransportPeripheralMdoc.kt
Outdated
Show resolved
Hide resolved
91b9c7c
to
f9685eb
Compare
...oc/src/androidMain/kotlin/com/android/identity/mdoc/transport/BlePeripheralManagerAndroid.kt
Outdated
Show resolved
Hide resolved
...oc/src/androidMain/kotlin/com/android/identity/mdoc/transport/BlePeripheralManagerAndroid.kt
Outdated
Show resolved
Hide resolved
identity-mdoc/src/iosMain/kotlin/com/android/identity/mdoc/transport/BleCentralManagerIos.kt
Outdated
Show resolved
Hide resolved
identity-mdoc/src/iosMain/kotlin/com/android/identity/mdoc/transport/BlePeripheralManagerIos.kt
Outdated
Show resolved
Hide resolved
This adds new multiplatform API to the identity-mdoc library for ISO/IEC 18013-5:2021 proximity presentations. It works on both Android and iOS and both operating systems share a lot of common code. Also add support two new pages - "ISO mdoc Proximity Sharing" and "ISO mdoc Proximity Reading" - to the multi-platform test app. This only includes QR engagement, NFC engagement will be added in a future change. These two pages represent feature complete mDL and mDL reader functionality and are designed to work with other implementations as well as with itself. Also introduce `rememberBluetoothPermissionState` composable function and `BluetoothPermissionState` object which can be used to obtain the required permissions on BLE on both Android and iOS. Also devise a new multi-testing framework for automatically testing a number of mDL presentations between two devices. This is available in a new "ISO mdc Multi-Device Testing" page in the test app and the way it works is that the 1st device offers a QR code that the 2nd device scans. This sets up a TCP/IP control plane used for initiating tests, including sharing `DeviceEngagement`. This helps ensure the code is robust and well-tested both for happy paths and with all the various termination options available in the standard. Also modify existing L2CAP support so it follows the latest draft of the upcoming second edition of ISO 18013-5:2021. In particular, this means framing the `SessionData` / `SessionEstablishment` packets sent over the L2CAP socket. Modify `ScanQrCodeDialog` and `ShowQrCodeDialog` so they are easy to extend. Include portrait ans signature images in sample data in identity-doctypes. Test: Manually tested against wallet app and well-known readers. Signed-off-by: David Zeuthen <[email protected]>
f9685eb
to
0c5aa3e
Compare
Thanks for the review! Replaced all occurrences of 0x01 and 0x02 with |
This adds new multiplatform API to the identity-mdoc library for ISO/IEC 18013-5:2021 proximity presentations. It works on both Android and iOS and both operating systems share a lot of common code.
Also add support two new pages - "ISO mdoc Proximity Sharing" and "ISO mdoc Proximity Reading" - to the multi-platform test app. This only includes QR engagement, NFC engagement will be added in a future change. These two pages represent feature complete mDL and mDL reader functionality and are designed to work with other implementations as well as with itself.
Also introduce
rememberBluetoothPermissionState
composable function andBluetoothPermissionState
object which can be used to obtain the required permissions on BLE on both Android and iOS.Also devise a new multi-testing framework for automatically testing a number of mDL presentations between two devices. This is available in a new "ISO mdc Multi-Device Testing" page in the test app and the way it works is that the 1st device offers a QR code that the 2nd device scans. This sets up a TCP/IP control plane used for initiating tests, including sharing
DeviceEngagement
. This helps ensure the code is robust and well-tested both for happy paths and with all the various termination options available in the standard.Also modify existing L2CAP support so it follows the latest draft of the upcoming second edition of ISO 18013-5:2021. In particular, this means framing the
SessionData
/SessionEstablishment
packets sent over the L2CAP socket.Modify
ScanQrCodeDialog
andShowQrCodeDialog
so they are easy to extend.Include portrait ans signature images in sample data in identity-doctypes.
Test: Manually tested against wallet app and well-known readers.